package gui;

import java.awt.Color;
import java.awt.Graphics2D;
import java.io.Serializable;

import dataStructure.Graph;

public class UI_SFG extends Graph<UI_Node, UI_Branch> implements Serializable {

	public UI_SFG() {
		super();
	}

	public void paint(Graphics2D g, MyView v) {
		g.setColor(Color.BLACK);
		for (UI_Node ny : nodes())
			for (UI_Node nx : nodes())
				if (isConnected(ny, nx))
					getConnection(ny, nx).paint(g, v);
		for (UI_Node n : nodes()) {
			g.setColor(Color.WHITE);
			n.paint(g, v);
		}
	}

	@Override
	public String toString() {
		return map.toString() + "\n" + matrix.toString().replaceAll("null", " ");
	}
}
